<?php
$phpversion = phpversion();

if($phpversion < 4.1)
   {
   $_COOKIE=&$HTTP_COOKIE_VARS;
   $_SERVER=&$HTTP_SERVER_VARS;
   $_FILES=&$HTTP_POST_FILES;
   $_GET=&$HTTP_GET_VARS;
   $_POST=&$HTTP_POST_VARS;
   $_SESSION=&$HTTP_SESSION_VARS;
   $_ENV=&$HTTP_ENV_VARS;
   }

if(get_magic_quotes_gpc() == 0)
   {
   on_gpc();
   }

function makeon($v) {
   return is_array($v) ? array_map('makeon', $v) : addslashes($v);
 }

 function on_gpc() {
   foreach (array('POST', 'GET', 'REQUEST', 'COOKIE', 'SERVER') as $gpc)
   $GLOBALS["_$gpc"] = array_map('makeon', $GLOBALS["_$gpc"]);
 }

if(get_magic_quotes_runtime() == 1)
   {
   @set_magic_quotes_runtime(0);
   }
?>